<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="author" content="lzy">
    <title>lzy-</title>
    <style>
        html,body{
            height: 100%;
        }
        body{
            margin: 0;
        }
        h1{
            text-align: center;
            font-size: 18px;
            cursor: pointer;
        }
        div{
            width: 250px;
            height: 50px;
            margin: 0 auto;
            background-color: yellow;
            border: 1px solid orange;
            display: none;
        }
    </style>
</head>
<body>
    <h1>两周内自动登录</h1>
    <div>为了你的信息安全,请不要再网吧或公用电脑上使用该功能!</div>
</body>
</html>
<script>
    var h1 = document.querySelector('h1');
    var div = document.querySelector('div');
    h1.onmouseover=function(){
        div.style.display='block';
    }
    h1.onmouseout=function(){
        div.style.display='none';
    }   
</script>